package com.xzx.shop_front_api.service;

import com.xzx.shop_front_api.entity.Cart;

import java.util.List;

public interface CartService {
    //添加购物车
    int insertCart(Cart cart);
    //根据会员id和商品id查购物车
    Cart getCart(int memberId,int goodsId);
    int updateCart(int memberId,int goodsId,int quantity);
    List<Cart> getCartListByMemberId(int memberId);
    //总计
    Double getCartTotalAmount(int memberId);
    //删除购物车商品
    int deleteCartGoodsById(int id);
    //更新选中状态
    int updateSelectedById(Long id,int selected);

    List<Cart> getCartListByMemberIdSelected(int memberId);

    int batchUpdateSelected(String ids,int selected);

    int updateCartQuantity(int id, int quantity);
}
